function Car(model, year, miles) {
    this.model = model;
    this.year = year;
    this.miles = miles;
}

Car.prototype.toString = function () {
    return `${this.model} has done ${this.miles} miles`;
};

function main() {
    const car = new Car("BMW", 2009, 20000);
    console.log(car.toString());
}

main();
